package com.xopencode.auth;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;

/**
 * @Auther: Mcb
 * @Date: 2021/12/5 20:12
 * @Description: 授权服务器微服务
 */
@SpringBootApplication
//开启资源服务器，项目下的资源受权限认证保护
//注释意味着您的服务(就 OAuth 2.0 - 资源服务器而言)需要访问 token 来处理请求。在调用资源服务器之前，OAuth 2.0 客户端应从授权服务器获取访问 token
@EnableResourceServer
@EnableDiscoveryClient
@EnableFeignClients
@EnableCircuitBreaker
@RefreshScope
public class AuthApplication {
    public static void main(String[] args) {
        SpringApplication.run(AuthApplication.class,args);
    }
}
